<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>rectangle_properties</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Data type</center>
    <div align="right">Last update : 16/12/2005</div>
    <p>
      <b>rectangle_properties</b> - description of the Rectangle
  entity properties</p>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>The Rectangle entity is a leaf of the graphics entities hierarchy. This
    entity defines the parameters for rectangles and filled rectangles.</p>
    <dl>
      <dd>
        <b>parent: </b>This field contains the handle of the parent. The parent of the
        rectancle entity should be of the type <tt>
          <b>"Axes"</b>
        </tt> or
        <tt>
          <b>"Compound"</b>
        </tt>.</dd>
      <dd>
        <b>children: </b>This property contains a vector with the <tt>
          <b>children</b>
        </tt> of
        the handle. However, <tt>
          <b>rectangle</b>
        </tt> handles currently do not
        have any <tt>
          <b>children</b>
        </tt>.</dd>
      <dd>
        <b>mark_mode: </b>This field contains the default <tt>
          <b>mark_mode</b>
        </tt> property
        value for the polyline. Its value should be <tt>
          <b>"on"</b>
        </tt> (marks
        drawn) or <tt>
          <b>"off"</b>
        </tt> (no marks drawn).</dd>
      <dd>
        <b>mark_style: </b>The <tt>
          <b>mark_style</b>
        </tt> property value is used to select the
        type of mark to use when <tt>
          <b>mark_mode</b>
        </tt> property is
        <tt>
          <b>"on"</b>
        </tt>. The value should be an integer in [0 14] which
        stands for: dot, plus, cross, star, filled diamond, diamond, triangle
        up, triangle down, diamond plus, circle, asterisk, square, triangle
        right, triangle left and pentagram.</dd>
      <dd>
        <b>mark_size_unit: </b>This field contains the default <tt>
          <b>mark_size_unit</b>
        </tt>
        property value. If <tt>
          <b>mark_size_unit</b>
        </tt> is set to
        <tt>
          <b>"point"</b>
        </tt>, then the <tt>
          <b>mark_size</b>
        </tt> value is
        directly given in points. When <tt>
          <b>mark_size_unit</b>
        </tt> is set to
        <tt>
          <b>"tabulated"</b>
        </tt>, <tt>
          <b>mark_size</b>
        </tt> is computed relative
        to the font size array: therefore, its value should be an integer in
        [0 5] whith stands for 8pt, 10pt, 12pt, 14pt, 18pt and 24pt. Note that
        <a href="xrect.htm">
          <tt>
            <b>xrect</b>
          </tt>
        </a> and pure scilab functions use
        <tt>
          <b>tabulated</b>
        </tt> mode as default ; when using <a href="plot.htm">
          <tt>
            <b>plot</b>
          </tt>
        </a>
        function, the <tt>
          <b>point</b>
        </tt> mode is automatically enabled.</dd>
      <dd>
        <b>mark_size: </b>The <tt>
          <b>mark_size</b>
        </tt> property is used to select the type of
        size of the marks when <tt>
          <b>mark_mode</b>
        </tt> property is
        <tt>
          <b>"on"</b>
        </tt>. Its value should be an integer in [0 5] whith
        stands for 8pt, 10pt, 12pt, 14pt, 18pt and 24pt.</dd>
      <dd>
        <b>mark_foreground: </b>This field contains the <tt>
          <b>mark_foreground</b>
        </tt> property
        value which is the marks' edge color. Its value should be a color
        index (relative to the current color_map).</dd>
      <dd>
        <b>mark_background: </b>This field contains the <tt>
          <b>mark_background</b>
        </tt> property
        value which is the marks' face color. Its value should be a color
        index (relative to the current color_map).</dd>
      <dd>
        <b>line_mode: </b>This field contains the default <tt>
          <b>line_mode</b>
        </tt> property
        value for the rectangle. Its value should be <tt>
          <b>"on" </b>
        </tt>(line
        drawn) or <tt>
          <b>"off"</b>
        </tt> (no line drawn).</dd>
      <dd>
        <b>fill_mode: </b>If <tt>
          <b>fill_mode</b>
        </tt> property value is <tt>
          <b>"on" </b>
        </tt>,
        the rectangle is filled with the foreground color, the
        <tt>
          <b>mark_mode</b>
        </tt> must also have the value <tt>
          <b>"off"</b>
        </tt>. if
        not and the value's property is <tt>
          <b>"off"</b>
        </tt> only the shape of
        the rectangle is drawn using the foreground color.</dd>
      <dd>
        <b>line_style: </b>The <tt>
          <b>line_style</b>
        </tt> property value should be an integer in
        [1 6]. 1 stands for solid the other value stands for a selection of
        dashes.</dd>
      <dd>
        <b>thickness: </b>This field contains the line <tt>
          <b>thickness</b>
        </tt> property. Its
        value should be a positif integer.</dd>
      <dd>
        <b>foreground: </b>This field contains the color used to draw the outline of the
        rectangle. Its value should be a color index (relative to the current
        colormap).</dd>
      <dd>
        <b>background: </b>This field contains the color used to fill the rectangle. Its
        value should be a color index (relative to the current colormap).</dd>
      <dd>
        <b>data: </b>This property is to return the coordinates of the upper-left point
        of the rectangle and its width and height in the data units of the
        axes. The result is the matrix
        <tt>
          <b>[xleft,yup,[zup],width,height]</b>
        </tt>
      </dd>
      <dd>
        <b>visible: </b>This field contains the <tt>
          <b>visible</b>
        </tt> property value for
        the entity . It should be <tt>
          <b>"on" </b>
        </tt> or <tt>
          <b>"off"</b>
        </tt> .
        By default, the rectangle is visible, the value's property is
        <tt>
          <b>"on"</b>
        </tt>. If <tt>
          <b>"off"</b>
        </tt> the rectangle is not drawn on
        the screen.</dd>
      <dd>
        <b>clip_state: </b>This field contains the <tt>
          <b>clip_state</b>
        </tt> property value for
        the rectangle. It should be :<dl>
          <dd>
            <b></b>
            <tt>
              <b>"off"</b>
            </tt> this means that the rectangle is not
            clipped.</dd>
          <dd>
            <b></b>
            <tt>
              <b>"clipgrf"</b>
            </tt> this means that the rectangle is
            clipped outside the Axes box.</dd>
          <dd>
            <b></b>
            <tt>
              <b>"on"</b>
            </tt> this means that the rectangle is clipped
            outside the rectangle given by property clip_box.</dd>
        </dl>
      </dd>
      <dd>
        <b>clip_box: </b>This field is to determinate the <tt>
          <b>clip_box</b>
        </tt> property.
        By Default its value should be an empty matrix if clip_state is "off".
        Other cases the vector <tt>
          <b>[x,y,w,h]</b>
        </tt> (upper-left point width
        height) defines the portions of the rectangle to display, however
        <tt>
          <b>clip_state</b>
        </tt> property value will be changed.</dd>
      <dd>
        <b>user_data: </b>This field can be use to store any scilab variable in the
        rectangle data structure, and to retreive it.</dd>
    </dl>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>
   set("figure_style","new") //create a figure
   a=get("current_axes");//get the handle of the newly created axes
   a.data_bounds=[-2,-2;2,2];

   xrect(-1,1,2,2)

   r=get("hdl");//get handle on current entity (here the rectangle entity)
   r.type
   r.parent.type
   r.foreground=13;
   r.line_style=2;
   r.fill_mode="on";
   r.background=color('red');
   r.clip_box=[-1 1;1 1];
   r.data(:,[3 4])=[1/2 1/2];
   r.data(:,[1 2])=[1/2 1/2];
   r.clip_state="off"
      
 </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="set.htm">
        <tt>
          <b>set</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="get.htm">
        <tt>
          <b>get</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="delete.htm">
        <tt>
          <b>delete</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="xrect.htm">
        <tt>
          <b>xrect</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="xfrect.htm">
        <tt>
          <b>xfrect</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="xrects.htm">
        <tt>
          <b>xrects</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="graphics_entities.htm">
        <tt>
          <b>graphics_entities</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
    <h3>
      <font color="blue">Author</font>
    </h3>
    <p>Djalel ABDEMOUCHE</p>
  </body>
</html>
